class Solution {
public:
    void moveZeroes(vector<int>& nums) {
        size_t sz = nums.size();
        size_t cur = 0, dest = -1;
        while (cur < sz)
        {
            if (nums[cur] != 0)
            {
                ++dest;
                swap(nums[cur], nums[dest]);

            }
            ++cur;
        }
    }
};